package com.itheima.blog.web.controller;

import com.itheima.api.client.AdminClient;
import com.itheima.common.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/banner")
@Api("轮播图")
public class BannerController {
    private final AdminClient adminClient;

    @GetMapping("/list")
    @ApiOperation(value = "获取轮播图列表")
    public R getBannerList(){
        return adminClient.getBannerList();
        //return R.ok();
    }

}
